# -*- coding: utf-8 -*-

class GetParentName():
	def talk(self,name):
		self.name=name
		print 'my name is :%s' % self.name
	
class GetMyName(GetParentName):
	def talk(self,name):
		self.name=name
		print 'my name is :%s' % self.name
	def get_parent_name(self,name):
		self.name=name
		GetParentName.talk(self,name)

#调用自己		
myname=GetMyName()
myname.talk('wangweiya')  #输出   wangweiya


#调用父类
parentName=GetMyName()
parentName.get_parent_name("wangzhendong")  #输出 wangzhendong

		